﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void ​​highPrecisionMultiplication(string& str1, string& str2) {
	//准备工作
	int len1 = str1.size();
	int len2 = str1.size();
	vector<int> a(400);
	vector<int> b(400);
	vector<int> result(800);
	int j = 0;
	//逆序存放字符串
	for (int i = len1 - 1;i >= 0;i--) {
		a[j++] = str1[i]-'0';
	}
	j = 0;
	for (int i = len2 - 1;i >= 0;i--) {
		b[j++] = str2[i]-'0';
	}
	//竖式相乘
	for (int i = 0;i < len2;i++) {
		for (int j = 0;j < len1;j++) {
			result[j + i] = result[j + i] + a[j] * b[i];
			//处理进位
			if (result[j + i] > 10) {
				result[j + i + 1] += result[j + i] / 10;
				result[j + i] %= 10;
			}
		}
	}
	//处理前导零
	int index = 0;
	for (int i = result.size() - 1;i >= 0;i--) {
		if (result[i] != 0) {
			index = i;
			break;
		}
	}
	//反序输出结果
	for (int i = index;i >= 0;i--) {
		cout << result[i];
	}
	return;
}

void test1() {
	string str1;
	string str2;
	getline(cin, str1);
	getline(cin, str2);
	​​highPrecisionMultiplication(str1,str2);
}
int main() {
	test1();
	return 0;
}